#pragma once

#include "chunk.hpp"
#include <cstring>

namespace limbo {

template <typename T = void> struct customization {
  static void *copy(void *dest, const void *src, std::size_t count) {
    return memcpy(dest, src, count);
  }

  static void copy(Chunk &dest, const Chunk source) {
    void *tail = (char *)dest.data_ + dest.size_;
    if (tail != source.data_) {
      copy(tail, source.data_, source.size_);
    }
    dest.size_ += source.size_;
  }
};

} // namespace limbo
